void main(){
  //通过Map给类的属性初始化
  var person=new Person('tony gagag', 14, 'male');
}

class Person{
  String name;
  int age;

  final String gender;

  Person(this.name,this.age,this.gender);
  //给final修饰的属性使用这种写法赋值
  Person.withMap(Map map):gender=map['gender']{
    age=map['age'];
  }

  void work(){
    print("Working.......");
  }
}